/*
 * Copyright (C) Michael Martin & Antonio Carrozzini (TBJD)
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 */

package org.tbjd.client.factories;

import java.util.ArrayList;
import java.util.List;

import org.tbjd.client.beans.Resource;

import com.google.gwt.user.client.Random;

public class ResourceFactory {

	public static Resource getInstance() {
		Resource resource = new Resource();
		resource.setId(Random.nextInt(100));
		resource.setName("FooResource"+Random.nextInt(100));
		resource.setInitials("FRE");
		resource.setRatio(Random.nextInt(100));
		
		return resource;
	}

	public static List<Resource> getInstances() {
		List<Resource> resources = new ArrayList<Resource>();
		
		Resource resource1 = new Resource();
		resource1.setId(0);
		resource1.setName("Dimitri Lahrowsky");
		resource1.setInitials("DIL");
		resource1.setRatio(100);
		resources.add(resource1);
		
		Resource resource2 = new Resource();
		resource2.setId(1);
		resource2.setName("John McCain");
		resource2.setInitials("JOM");
		resource2.setRatio(80);
		resources.add(resource2);
		
		Resource resource3 = new Resource();
		resource3.setId(2);
		resource3.setName("Odette LaPointe");
		resource3.setInitials("ODL");
		resource3.setRatio(50);
		resources.add(resource3);
		
		Resource resource4 = new Resource();
		resource4.setId(3);
		resource4.setName("Pierre Dupont");
		resource4.setInitials("PID");
		resource4.setRatio(100);
		resources.add(resource4);

		return resources;
	}

}
